package com.itheima.controller;

import com.itheima.common.PageBean;
import com.itheima.common.R;
import com.itheima.dto.ClazzQueryDto;
import com.itheima.service.ClazzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/clazzs")
public class ClazzController {

    @Autowired
    ClazzService clazzService;

    //分页查询班级
    @GetMapping
    public R pageQuery(ClazzQueryDto dto) {
        PageBean pageBean = clazzService.pageQuery(dto);
        return R.ok(pageBean);
    }
}
